package com.algorithm.singleton;

/**
 * Package: com.algorithm.singleton
 * Description: 单例【懒汉式 线程安全】
 * User: wangchao
 * Date: 2018-04-25
 * Time: 15:59
 */
public class SingletonLazyStyle {

    private static SingletonLazyStyle singletonLazyStyle;

    private SingletonLazyStyle(){};

    public static synchronized SingletonLazyStyle getSingletonLazyStyle(){
        if (singletonLazyStyle == null) {
            singletonLazyStyle = new SingletonLazyStyle();
        }
        return singletonLazyStyle;
    }
}
